import React from "react";
import '../../../../static/css/mobile/geren_top.less';


export default class Geren_top extends React.Component{
	constructor(){
     super();
     this.state = {
     	information: []
     }
	}

	componentDidMount(){
		this.http()
	}

	http(){
		var result = fetch("http://www.wwtliu.com/sxtstu/news/juhenews.php?type=junshi&count=1",{
			method:"get"
		})
		.then(res => {
			return res.json();
		})
		.then(json => {
			this.setState({
				information:json
			})
		})
	}
  

	render(){
		var { information }  = this.state;
		console.log(information)
		return(
            <div className="geren_top">
                 <div className="touxiang">
                   {                  
	                   information.map((a,b)=>{
	                   	 return(
	                   	 	<div>
	                   	 	  <img src={a.thumbnail_pic_s} alt=""/>
	                   	 	  <h2>大肉猛吃不胖</h2>
	                   	 	</div>
	                   	 )  
	                   })
	                }
                 </div>
            </div>
			)
	}
}




